<template>
  <el-table
    :data="props.data"
    border
  >
    <slot name="start" />
    <el-table-column
      align="center"
      label="角色id"
    >
      <template #default="scope">
        {{ scope.row.id }}
      </template>
    </el-table-column>
    <el-table-column
      align="center"
      label="角色名称"
    >
      <template #default="scope">
        {{ scope.row.name }}
      </template>
    </el-table-column>
    <el-table-column
      align="center"
      label="默认"
    >
      <template #default="scope">
        {{ scope.row.isDefault ? '是' : '否' }}
      </template>
    </el-table-column>
    <slot name="end" />
    <!-- <el-table-column
      align="center"
      width="250"
      label="操作"
    >
      <template #default="scope">
        <el-button
          type="text"
          @click="handleEdit(scope.row)"
        >
          修改
        </el-button>
        <el-button
          type="text"
          @click="handleRole(scope.row)"
        >
          权限
        </el-button>
        <el-button
          type="text"
          @click="handleDelete(scope.row)"
        >
          删除
        </el-button>
      </template>
    </el-table-column> -->
  </el-table>
</template>

<script setup lang="ts">
import type { IRole } from '@/http/types/role'
import { PropType } from 'vue'

const props = defineProps({
  data: {
    type: Array as PropType<IRole[]>,
    default: () => []
  }
})

</script>

<style scoped lang="scss">
// .userTable{}
</style>
